package com.iptv.grape.bu;

public class BuildRes {
    private Exception exception = null;
    private boolean isSuccess = false;
    private Object buildResult = null;
    private String reason = null;

    private Object args;

    public Object getArgs() {
        return args;
    }



    public BuildRes(){
        isSuccess = true;
    }

    public BuildRes(Object buildResult,Object args){
        this.buildResult = buildResult;
        this.args = args;
        this.isSuccess = true;
    }

    public BuildRes(Exception exception,String reason){
        this.exception = exception;
        this.isSuccess = false;
        this.reason = reason;
    }

    public BuildRes(Exception exception){
        this.exception = exception;
        this.isSuccess = false;
    }

    public Exception getException() {
        return exception;
    }

    public boolean isSuccess() {
        return isSuccess;
    }

    public boolean hasBuildResult() {
        return buildResult != null;
    }

    public Object getBuildResult() {
        return buildResult;
    }

    public String getReason() {
        return reason;
    }
}
